<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of AdminForm
 *
 * @author WIN7
 */
class AdminForm extends CFormModel{
    //put your code here
    public function getDatabase() {
        $connection = Yii::app()->db;
        $sql = "SELECT * FROM os_admin";
        $data = $connection->createCommand($sql)->query();
        $rows_admin = array();
        while ($row = $data->read()) {
            $rows_admin[] = $row;
        }
        return $rows_admin;
    }
}

?>
